<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <link rel="stylesheet" href="../normalize.css">
    <title>父元素高度不确定的文本、图片、块级元素的竖直居中</title>
</head>
<body>
    <style type="text/CSS">
        .wrap{background:#000; width:500px; color:#fff; margin-bottom:10px;padding-top:20px; padding-bottom:20px}
        .test{width:200px;height:50px;background:rgb(230, 135, 135);}
    </style>
    <div class="wrap">hello world</div>
    <div class="wrap"><img src="https://www.baidu.com/img/bd_logo1.png?where=super" /></div>
    <div class="wrap">
        <div class="test"></div>
    </div>
</body>
</html>